Computer programs that operate in a windowing environment commonly use dialog windows to present information and receive input from a user. One example of a popular windowing environment is the Windows® 2000 operating system manufactured by Microsoft Corporation of Redmond, Wash. Software applications such as word processing applications also use dialog windows to present information and receive input from a user. An example of a popular word processing software application is WORD manufactured by Microsoft Corporation of Redmond, Wash. Typical dialog windows contain one or more controls. Examples of these controls are push buttons, radio buttons, check boxes and list boxes. A list box, for example, may be placed in a File Open dialog window, and the list box may contain a listing of files or documents available to the user for opening. Static controls display organized information, but do not receive user input. A label box control is one example of a static control.
During the creation of a dialog window, the position and dimensions of each control within the window are set. The coordinates and dimensions may be specified either in pixels or in dialog units. The value of a dialog unit is mainly dependent on the font used in the dialog. To the extent that the default dialog font differs between operating systems, a dialog unit may be indirectly dependent on the operating system. A common definition of a dialog unit (DLU) is a unit of horizontal or vertical distance within a dialog box. A horizontal DLU is the average width of the current dialog box font divided by four (4). A vertical DLU is the average height of the current dialog-box font divided by eight (8). Once a dialog window is created, a change to the dialog window as a whole may trigger the need to recalculate the coordinates and/or dimensions of each control within the dialog. When the control coordinates and dimensions are specified prior to execution of the program and there is no code to alter the control coordinates and dimensions throughout the run-time life of the dialog, the layout of the dialog window does not change even if the size of the dialog window changes.
Mechanisms have been developed that allow a program developer to specify the relative positions of the controls within the dialog window without specifying precise coordinates or dimensions of each control. At the time the dialog window is displayed (during the execution of the program to which the dialog belongs), these mechanisms automatically calculate the proper coordinates and dimensions of each control and then appropriately position and size the controls based on those coordinates and dimensions.
Such mechanisms allow for a way to ensure the efficient sizing and layout of the controls contained within a dialog window at the development stage of the software application to which the dialog window belongs. The sizes and layout of these controls are acted on at run time, as the dialog window is created on the user's computer. However, such systems do not allow for the dynamic resizing and repositioning of the controls within a dialog window in response to a user action to increase or decrease the size of the dialog window during use of the software application to which the dialog window belongs.
It is with respect to these considerations and others that the present invention has been made.